package com.jet.goods.service;

import com.jet.core.model.vo.PageVo;
import com.jet.goods.domain.dto.CategoryDto;
import com.jet.goods.domain.entity.GoodsCategory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jet.goods.domain.query.CategoryListQuery;
import com.jet.goods.domain.query.CategoryQuery;
import com.jet.goods.domain.vo.CategoryTreeVo;
import com.jet.goods.domain.vo.CategoryVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2025-03-04
 */
public interface IGoodsCategoryService extends IService<GoodsCategory> {

    GoodsCategory create(long merchantNo, CategoryDto dto);

    void edit(long merchantNo, String id, CategoryDto dto);

    void editSort(long merchantNo, String id, CategoryDto dto);

    void categoryImport(long merchantNo, MultipartFile file);

    void deleteById(long merchantNo, String id);

    GoodsCategory findById(long merchantNo, String id);

    List<GoodsCategory> findByPid(String pid);

    PageVo<CategoryVo> page(long merchantNo, CategoryQuery query);

    List<CategoryTreeVo> tree(long merchantNo);

    GoodsCategory findByName(long merchantNo, String name, String pid);

    List<GoodsCategory> findAll(long merchantNo, CategoryListQuery query);
}
